import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import List from "../views/List.vue";

Vue.use(VueRouter);

const routes = [
  { path: "*", redirect: "/" },
  {
    path: "/",
    name: "Home",
    component: Home,
    alias: "/home",
    meta: "首页",
  },
  {
    path: "/List",
    name: "List",
    component: List,
    meta: "列表页",
  },
];

const router = new VueRouter({
  routes,
});

export default router;
